import Vue from 'vue'
const Navigation = (url, option) => {
	let query = false;
	if (option) {
		Object.keys(option).forEach(key => {
			if (!query) {
				query = '?' + key + '=' + option[key];
			} else {
				query+= '&' + key + '=' + option[key];
			}
		});
	}
	uni.navigateTo({
		url: url + (query ? query : ''),
		animationType: 'zoom-fade-out'
	});
}

Vue.prototype.$navigation = Navigation